package com.woniuxy.services.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniuxy.daos.TbSendmessageDao;
import com.woniuxy.entitys.TbSendmessage;
import com.woniuxy.services.SendMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SendMessageServiceImpl implements SendMessageService {
    @Autowired
    private TbSendmessageDao tbSendmessageDao;
    @Override
    public PageInfo<TbSendmessage> getSendMessageList(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<TbSendmessage> list = tbSendmessageDao.selectSendMessageList();
        PageInfo<TbSendmessage> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
